﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CadDotNetTools
{
    public static class UnitTools
    {
        /// <summary>
        /// 角度转弧度
        /// </summary>
        /// <param name="degree">角度</param>
        /// <returns>弧度</returns>
        public static double DegreeToAngle(this double degree)
        {
            return degree * (Math.PI / 180);
        }
        /// <summary>
        /// 弧度转角度
        /// </summary>
        /// <param name="angle">弧度</param>
        /// <returns>角度</returns>  
        public static double AngleToDegree(this double angle)
        {
            return 180 / Math.PI * angle;
        }
    }
}
